Product : ISaGRAF 3
Date : 17-October-2000
File : Difference between semaphore and Mutex.htm
Subject : Comparison between binary semaphores and mutex semaphores
Keywords: semaphore - mutex - porting - system layer
____________________________________________________________________
Comparison between Mutex and binary semaphores in ISaGRAF:
- Both have just 2 states (taken or free)
- Priority inheritance: with Mutex, a task (process) with low priority (T1) inherits the priority
of a higher priority task (T2) that is waiting for the same mutex. So the low priority task (T1) becomes a high priority task.
Now if a medium priority task needs to run, in fact it does not run, because T1 has a higher priority (until T1 has released the mutex, and T2 has finished its execution).
This is generally called "priority inversion safety".
____________________________________________________________________
Copyright © 1996-2009 ICS Triplex ISaGRAF Inc. All rights reserved.